import { getCategoryAPI } from "@/apis/testApi";
import { defineStore } from "pinia";
import { ref } from "vue";

export const useCategoryStore = defineStore('category',()=>{
    // 导航数据管理
    const categoryList = ref([])
    const getCategory = async () =>{
        const res = await getCategoryAPI()
        categoryList.value = res.result
    }
    return{
        categoryList,
        getCategory
    }
})